/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = t_frstat_topology_report.c                         */
/*  NOTE      =                                                    */
/*  DATE      = 2015/02/02 by geyh                                 */
/*******************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <CUnit/Basic.h>
#include <CUnit/CUnit.h>

#include "frcomm.h"
#include "frmem.h"
#include "frsutl.h"
#include "frlist.h"
#include "frhash2.h"
#include "conntrack.h"
#include "module_comm.h"
#include "module.h"
#include "frstat_topology.h"
#include "frct_hash.h"
#include "apmtest_cunit.h"

static int __suite_init(void)
{
	return 0;
}

static int __suite_cleanup(void)
{
	return 0;
}


static void case1(void)
{
    int i_ret = 0;

    frct_hash_init(1);
    i_ret = frstat_topology_report(NULL);

    frct_hash_destory(NULL);
    CU_ASSERT_EQUAL(i_ret,FR_SUCC);
    return;

}


int add_suite()
{
	CU_pSuite pSuite = NULL;

	pSuite = CU_add_suite("t_frstat_topology_report 测试", __suite_init, __suite_cleanup);

	if (NULL == pSuite)
	{
		return 1;
	}


    //增加测试用例
   	CU_add_test(pSuite, "case1", case1);

    return 0;

}

int main(int argc, char **argv)
{
    fr_slab_init(52428800, "test");
    run_cunit(add_suite);
    fr_slab_destroy();

    return 0;
}